<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>
<?php use_javascript('/ueditor/editor_config.js'); ?>
<?php use_javascript('/ueditor/editor_all.js'); ?>
<?php use_stylesheet('/ueditor/themes/default/ueditor.css'); ?>

<div class="sf_admin_form">
  <?php echo form_tag_for($form, '@dynamicinfomation') ?>
    <?php echo $form->renderHiddenFields(false) ?>

    <?php if ($form->hasGlobalErrors()): ?>
      <?php echo $form->renderGlobalErrors() ?>
    <?php endif; ?>

    <?php foreach ($configuration->getFormFields($form, $form->isNew() ? 'new' : 'edit') as $fieldset => $fields): ?>
      <?php include_partial('dynamicinfomation/form_fieldset', array('dynamicinfomation' => $dynamicinfomation, 'form' => $form, 'fields' => $fields, 'fieldset' => $fieldset)) ?>
    <?php endforeach; ?>

    <?php include_partial('dynamicinfomation/form_actions', array('dynamicinfomation' => $dynamicinfomation, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?>
  </form>
</div>
<script type="text/javascript">
    var option = {
            toolbars:[['Bold', 'Italic', 'Underline', 'StrikeThrough', '|',
                    'RemoveFormat', 'FormatMatch',  '|',
                    'ForeColor', 'BackColor',  '|',
                    'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyJustify',  '|',
                    'InsertOrderedList', 'InsertUnorderedList',  '|','link', 'unlink', '|',
                    'insertimage', 'insertvideo','pagebreak','|',
                    'inserttable', 'deletetable','|',
                    'Source', 'preview','help'
                ]],
            minFrameHeight:160,
            maximumWords:5000
        };
    var editor = new UE.ui.Editor(option);
    editor.render("dynamicinfomation_content");
    //1.2.4以后可以使用一下代码实例化编辑器
    //UE.getEditor('myEditor')
</script>
